package cn.funeralobjects.asms.entity;

import cn.funeralobjects.asms.converter.SendStatusConverter;
import cn.funeralobjects.utils.aliyun.sms.enums.SendStatus;
import lombok.Data;
import lombok.experimental.Accessors;

import javax.persistence.*;

/**
 * Entity of SmsSendResult
 *
 * @author FuneralObjects
 * Create date: 2020/5/31 5:23 PM
 */
@Data
@Accessors(chain = true)
@Entity
@Table(name = "t_sms_send_result")
public class ESmsSendResult {

    @Id
    private Integer recordId;
    private String receiveDate;
    private String sendDate;
    private String errCode;
    private String content;
    @Convert(converter = SendStatusConverter.class)
    private SendStatus status;

    @OneToOne
    @PrimaryKeyJoinColumn(name = "record_id")
    private ESmsSendRecord record;
}
